//
//  UserDB.m
//  Order
//
//  Created by funny on 12-3-22.
//  Copyright 2012 __MyCompanyName__. All rights reserved.
//

#import "UserDB.h"


@implementation UserDB

@synthesize userID, name, key, jurisdictionType;

- (id)initWithID:(NSInteger)newID andName:(NSString *)newName andKey:(NSString *)newKey andJurisdiction:(UserJurisdictionType)newJurisdiction{
	
    self = [super init];
    if (self) {
        // Custom initialization.
		
		userID = newID;
		name = [newName copy];
		key = [newKey copy];
		
		jurisdictionType = newJurisdiction;
    }
    return self;
}

+ (UserDB *)userDBWithID:(NSInteger)newID andName:(NSString *)newName andKey:(NSString *)newKey andJurisdiction:(UserJurisdictionType)newJurisdiction{
	UserDB *newUserDB = [[[UserDB alloc] initWithID:newID andName:newName andKey:newKey andJurisdiction:newJurisdiction] autorelease];
	
	return newUserDB;
}

- (void)dealloc {
	[name release];
	[key release];
	
    [super dealloc];
}

@end
